home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / ircii-2.8he / ircii-2 / help / ALIAS / special < prev    next >
Encoding:
Text File  |  1993-05-04  |  4.8 KB  |  104 lines

  1. Special character sequences for ALIAS:
  2.   All special character sequences begin with a $.  In their simpliest
  3.   form, the following have special meaning in aliases:
  4.     $*   Expands to the rest of the arguments on the command line.
  5.     $n   Where n is a non-negative number, expands to the nth arg.
  6.     $n-m Where n and m are non-negative numbers, expands to the
  7.          nth thru mth arguments inclusive.
  8.     $n-  Where n is a non-negative number, expands from the nth
  9.          argument to the end of the argument list.
  10.     $-m  Where m is a non-negative number, expands from the
  11.          beginning of the argument list to the mth argument.
  12.          This is the same as $0-m.
  13.     $~   Expands to the last word on a line.
  14.     $,   Expands to the nickname of the last person who send you 
  15.          a /MSG
  16.     $.   Expands to the nickname of the last person to whom you 
  17.          sent a /MSG
  18.     $variable  Expands to the value of one of the following:
  19.            1) Matching ASSIGN'd variable
  20.            2) Matching IRCII SET variable
  21.            3) Matching environment variable
  22.            4) Nothing
  23.          It checks in the order shown.  Thus, if 1 doesn't match, 2 is
  24.          tried.  If 2 doesn't match, 3 is tried, etc.
  25.          See ASSIGN for more details.
  26.     $[number]variable  Expands the variable and shows only 'number' of
  27.      characters. e.g. $blue == "nonsense"  $[3]blue == "non"
  28.      and $[20]blue == "nonsense           "    
  29.      In the second case note it is left justified in the space.
  30.     $[-number]variable Expands as above but it is right justified when
  31.      the 'number'  is bigger than the number of chars in variable.
  32.          $[20]blue == "           nonsense"
  33.     $#variable  Expands to the number of words in the variable.
  34.     $@variable  Expands to the number of letters in the variable.
  35.     $"Prompt"  Will prompt you (using the text between the double 
  36.                quotes) for input which will be replaced in the 
  37.                alias. ***WARNING***  This is no longer supported.
  38.                use the INPUT command instead.
  39.     $(sub-alias)  This expands out the sub-aliases, then uses that
  40.          result in place of the (sub-alias) expression.  For example
  41.          $($0) will first expand $0... suppose it expands to S.  Then
  42.          it replaces that in the original text, giving you $S, which
  43.          is then expanded to the name of your current server.
  44.     $!history!  This expands to a matching entry in your command
  45.          history.  The text between the ! may contain wildcards.
  46.     $:   Expands to the nickname of the last person to join your 
  47.          channel
  48.     $;   Expands to the nickname of the last person to send a public
  49.          message to your channel
  50.     $A   Expands to the text of your AWAY message
  51.     $B   Expands to the body of the last MSG you sent.
  52.     $C   Expands to your current channel
  53.     $D   Expands to the nickname of the person whose sign-on was last
  54.          detected by the NOTIFY mechanism
  55.     $H   Expands to the current numeric being processed
  56.     $I   Expands to the name of the channel to which you were last
  57.          INVITED
  58.     $K   Expands to the current value of CMDCHAR.  Useful to have 
  59.          aliases work even when you change CMDCHAR.
  60.     $L   Expands to the current contents of the input line
  61.     $N   Expands to your nickname
  62.     $O   Expands to the value of STATUS_OPER if you are currently an operator
  63.     $P   Expands to "@" if you are a chanop on the current channel
  64.     $Q   Expands to the nickname of the person you are QUERYing.
  65.     $S   Expands to the name of your server
  66.     $T   Expands to the 'target' of your input (either a QUERY nick or
  67.          a current channel)
  68.     $U   Expands to the last thing cut from the command line. e.g. ^U to 
  69.          clear line will put the line in the variable $U
  70.     $V   Expands to the internal ircII release date
  71.     $W   Expands to the current working directory
  72.     $Z   Expands to the time of day
  73.     $$   Expands to $
  74.  
  75.   Argument to aliases will automatically be appended to the expanded
  76.   alias unless you use one of the following forms in the alias:
  77.      $*
  78.      $n
  79.      $n-m
  80.      $-m
  81.      $n-
  82.      $(sub-alias)
  83.   If one of these forms is used in the alias arguments are not appended.
  84.   For example: 
  85.     ALIAS M /MSG
  86.   will be treated as:      
  87.     ALIAS M /MSG $*
  88.   However,
  89.     ALIAS M /MSG $0 $1-
  90.   will not have the arguments appended.  If you have an alias and you wish to 
  91.   prevent arguments from being appended, add $() to the alias.  The $() with
  92.   nothing between the parenthesis expands to nothing and prevents arguments
  93.   from being appended.
  94.  
  95.   Any alias may be surrounded by {}s so that it can be imbedded within
  96.   another string.  For example:
  97.     a${N}a
  98.   will expand to (assuming your nickname is BigCheese):
  99.     aBigCheesea
  100.   Aliases are automatically delimited by certain characters.  For example:
  101.     "$N"
  102.   expands to:
  103.     "BigCheese"
  104.